package com.laolu.icon.win32;

import com.laolu.icon.win32.struct.LVITEM;
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.platform.win32.WinNT;
import com.sun.jna.platform.win32.WinUser;
import com.sun.jna.ptr.PointerByReference;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;

public interface User32Extra extends StdCallLibrary, WinUser, WinNT {
	User32Extra INSTANCE = Native.load("user32", User32Extra.class, W32APIOptions.DEFAULT_OPTIONS);
	
	// 查找窗口句柄
	HWND FindWindowEx(HWND hwndParent, HWND hwndChildAfter, String lpszClass, String lpszWindow);
	
	HWND FindWindowExA(HWND hwndParent, HWND hwndChildAfter, String lpszClass, String lpszWindow);
	
	// 发送消息到 ListView 控件
	int SendMessage(HWND hWnd, int msg, WPARAM wParam, LVITEM lParam);
	
	int GetDesktopWindow();
	
	int SendMessage(HWND hWnd, int msg, WPARAM wParam, POINT.ByReference lParam);
	
	int SendMessage(HWND hWnd, int msg, WPARAM wParam, PointerByReference lParam);
	
	LRESULT SendMessage(HWND hWnd, int msg, WPARAM wParam, Pointer lParam);
	
	
	LRESULT SendMessageTimeout(HWND hWnd, int msg, WPARAM wParam, Pointer lParam,
	                           int fuFlags, int uTimeout, DWORDByReference lpdwResult);
}

